class EditorasController < ApplicationController
 
  before_filter :authenticate
 
  def new
  @editora = Editora.new
  end

  def create
  @editora = Editora.new(params[:editora])
  if @editora.save 
    redirect_to editoras_path
  else 
    render :action => 'new'
  end
  end
  
  def search
  
  end

  def destroy
  end
  
  protected
  def authenticate
  
  if session[:logged]
    true
  else 
    redirect_to new_session_path
  end
  
  end

end
